<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Bobble Fruit: Riferimenti per il file collisioni.cc</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Bobble Fruit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generato da Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Cerca');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Pagina&#160;Principale</span></a></li>
      <li><a href="annotated.html"><span>Classi</span></a></li>
      <li class="current"><a href="files.html"><span>File</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Cerca" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Elenco&#160;dei&#160;file</span></a></li>
      <li><a href="globals.html"><span>Elementi&#160;dei&#160;file</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tutto</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classi</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>File</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funzioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variabili</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Tipi enumerati (enum)</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Valori del tipo enumerato</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Definizioni</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pagine</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Funzioni</a>  </div>
  <div class="headertitle">
<div class="title">Riferimenti per il file collisioni.cc</div>  </div>
</div><!--header-->
<div class="contents">

<p>Questo è un file C++ che contiene le definizioni delle funzioni dichiarate in <a class="el" href="collisioni_8h.html" title="Questo è un header file che contiene i protitipi delle funzioni definite in collisioni.cc.">collisioni.h</a>.  
<a href="#details">Continua...</a></p>
<div class="textblock"><code>#include &lt;allegro5/allegro.h&gt;</code><br/>
<code>#include &lt;allegro5/allegro_primitives.h&gt;</code><br/>
<code>#include &lt;allegro5/allegro_image.h&gt;</code><br/>
<code>#include &lt;allegro5/allegro_audio.h&gt;</code><br/>
<code>#include &lt;allegro5/allegro_acodec.h&gt;</code><br/>
<code>#include &lt;iostream&gt;</code><br/>
<code>#include &lt;sstream&gt;</code><br/>
<code>#include &quot;<a class="el" href="collisioni_8h_source.html">collisioni.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="globali_8h_source.html">globali.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="models_8h_source.html">models.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="debug_8h_source.html">debug.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Funzioni</h2></td></tr>
<tr class="memitem:abf3a1501eaf0c89436fdb6bba12aaf96"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="collisioni_8cc.html#abf3a1501eaf0c89436fdb6bba12aaf96">collisioni_X</a> (int x1min, int x1max, int x2min, int x2max)</td></tr>
<tr class="memdesc:abf3a1501eaf0c89436fdb6bba12aaf96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Controlla i casi di collisione possibili tra due oggetti.  <a href="#abf3a1501eaf0c89436fdb6bba12aaf96"></a><br/></td></tr>
<tr class="memitem:a7949c37965bd556ee067a251b47ac3da"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="collisioni_8cc.html#a7949c37965bd556ee067a251b47ac3da">collisioni_Y</a> (int y1max, int y2min)</td></tr>
<tr class="memdesc:a7949c37965bd556ee067a251b47ac3da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Controlla che i due oggetti abbiano le altezze affiancate.  <a href="#a7949c37965bd556ee067a251b47ac3da"></a><br/></td></tr>
<tr class="memitem:a12edf1ba950aa73c89fc9fbf5df6abe0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="collisioni_8cc.html#a12edf1ba950aa73c89fc9fbf5df6abe0">gestisci_collisione_bolle</a> (<a class="el" href="structBolle.html">Bolle</a> <a class="el" href="globali_8h.html#ae0081eba65b03226aa248d54612ca7c7">bolle</a>[], int bDim, <a class="el" href="structRobot.html">Robot</a> <a class="el" href="globali_8h.html#a3658e8c4b8b7295dc44657c5bdb4f59a">robot</a>[], int cDim, <a class="el" href="structFrutta.html">Frutta</a> <a class="el" href="globali_8h.html#aa58faeb3510409ab3fda79f898914c49">frutta</a>[], int fDim, <a class="el" href="structDrago.html">Drago</a> &amp;<a class="el" href="globali_8h.html#ad5ff877f97ce83db08dd3c6905a66330">drago</a>)</td></tr>
<tr class="memdesc:a12edf1ba950aa73c89fc9fbf5df6abe0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Funzione che gestisce la collisione tra le bolle e o robot, o la frutta/dolci.  <a href="#a12edf1ba950aa73c89fc9fbf5df6abe0"></a><br/></td></tr>
<tr class="memitem:a1a755dbf67a837739df151394b4a96b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="collisioni_8cc.html#a1a755dbf67a837739df151394b4a96b6">gestisci_collisioni_frutta</a> (<a class="el" href="structFrutta.html">Frutta</a> <a class="el" href="globali_8h.html#aa58faeb3510409ab3fda79f898914c49">frutta</a>[], int fDim, <a class="el" href="structDrago.html">Drago</a> &amp;<a class="el" href="globali_8h.html#ad5ff877f97ce83db08dd3c6905a66330">drago</a>)</td></tr>
<tr class="memdesc:a1a755dbf67a837739df151394b4a96b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gestisce la collisione della frutta/dolce con ciascuna bolla o con il drago o con il pavimento.  <a href="#a1a755dbf67a837739df151394b4a96b6"></a><br/></td></tr>
<tr class="memitem:a5bdadd9b95a94192be51933f90730b21"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="collisioni_8cc.html#a5bdadd9b95a94192be51933f90730b21">gestisci_collisioni_robot</a> (<a class="el" href="structRobot.html">Robot</a> <a class="el" href="globali_8h.html#a3658e8c4b8b7295dc44657c5bdb4f59a">robot</a>[], int cDim, <a class="el" href="structDrago.html">Drago</a> &amp;<a class="el" href="globali_8h.html#ad5ff877f97ce83db08dd3c6905a66330">drago</a>)</td></tr>
<tr class="memdesc:a5bdadd9b95a94192be51933f90730b21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gestisce le collisione del robot con il drago o con il suolo.  <a href="#a5bdadd9b95a94192be51933f90730b21"></a><br/></td></tr>
</table>
<a name="details" id="details"></a><h2>Descrizione dettagliata</h2>
<div class="textblock"><p>Questo è un file C++ che contiene le definizioni delle funzioni dichiarate in <a class="el" href="collisioni_8h.html" title="Questo è un header file che contiene i protitipi delle funzioni definite in collisioni.cc.">collisioni.h</a>. </p>
<p>Queste funzioni vengono chiamate quando è necessario stabilise se due oggetti hanno colliso. Le funzioni specifiche per gli oggetti chiamano a loro volta collisioni_X e collisioni_Y. </p>
</div><h2>Documentazione delle funzioni</h2>
<a class="anchor" id="abf3a1501eaf0c89436fdb6bba12aaf96"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool collisioni_X </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x1min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x1max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x2min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x2max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Controlla i casi di collisione possibili tra due oggetti. </p>
<dl class="section return"><dt>Restituisce</dt><dd>true se x1min e x1max si sovrappongono a x2min e x2max. </dd></dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <a class="code" href="debug_8h.html#a330bea9b36f638349fec0d06c8ab4c38">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;  collisioni_X&quot;</span>&lt;&lt;endl);</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot;x1min: &quot;</span>&lt;&lt;x1min&lt;&lt;<span class="stringliteral">&quot;x2min: &quot;</span>&lt;&lt;x2min&lt;&lt;<span class="stringliteral">&quot;x1max: &quot;</span>&lt;&lt;x1max&lt;&lt;<span class="stringliteral">&quot;x2max: &quot;</span>&lt;&lt;x2max&lt;&lt;endl);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">if</span>(x1min &lt; x2min)</div>
<div class="line">                        <span class="keywordflow">return</span> x1max &gt;= x2min; </div>
<div class="line">        <span class="keywordflow">return</span> x2max &gt;= x1min;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a7949c37965bd556ee067a251b47ac3da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool collisioni_Y </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y1max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y2min</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Controlla che i due oggetti abbiano le altezze affiancate. </p>
<dl class="section return"><dt>Restituisce</dt><dd>true se y1 e y2 sono affiancate. </dd></dl>
<div class="fragment"><div class="line">{</div>
<div class="line">        <a class="code" href="debug_8h.html#a330bea9b36f638349fec0d06c8ab4c38">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;  collisioni_Y&quot;</span>&lt;&lt;endl);</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot;y1max: &quot;</span>&lt;&lt;y1max&lt;&lt;<span class="stringliteral">&quot;y2min: &quot;</span>&lt;&lt;y2min&lt;&lt;endl);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">if</span>(y1max &gt; y2min)</div>
<div class="line">                <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line">        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a12edf1ba950aa73c89fc9fbf5df6abe0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gestisci_collisione_bolle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structBolle.html">Bolle</a>&#160;</td>
          <td class="paramname"><em>bolle</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bDim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRobot.html">Robot</a>&#160;</td>
          <td class="paramname"><em>robot</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cDim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structFrutta.html">Frutta</a>&#160;</td>
          <td class="paramname"><em>frutta</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fDim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structDrago.html">Drago</a> &amp;&#160;</td>
          <td class="paramname"><em>drago</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Funzione che gestisce la collisione tra le bolle e o robot, o la frutta/dolci. </p>
<p>Richiama le funzioni di collisione collisioni_X e collisioni_Y. Se le bolle presenti sullo schermo sono vive e collidono con gli altri oggetti (robot o frutta) muoiono, e uccidono di conseguenza anche gli oggetti che toccano. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <a class="code" href="debug_8h.html#a330bea9b36f638349fec0d06c8ab4c38">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;  gestisci collisioni bolle&quot;</span>&lt;&lt;endl);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="debug_8h.html#a330bea9b36f638349fec0d06c8ab4c38">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot; dimensione array bolle = &quot;</span>&lt;&lt;bDim&lt;&lt;endl);</div>
<div class="line">        <a class="code" href="debug_8h.html#a330bea9b36f638349fec0d06c8ab4c38">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot; dimensione array frutta = &quot;</span>&lt;&lt;fDim&lt;&lt;endl);</div>
<div class="line">        <a class="code" href="debug_8h.html#a330bea9b36f638349fec0d06c8ab4c38">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot; dimensione array robot = &quot;</span>&lt;&lt;cDim&lt;&lt;endl);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; bDim; i++)</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span>(bolle[i].vivo)</div>
<div class="line">                {</div>
<div class="line">                        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j =0; j &lt; cDim; j++)</div>
<div class="line">                        {</div>
<div class="line">                                <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot;bolle.ID&quot;</span>&lt;&lt;bolle[i].ID&lt;&lt;<span class="stringliteral">&quot;  bolle.x&quot;</span>&lt;&lt;bolle[i].x&lt;&lt;<span class="stringliteral">&quot;  bolle.y&quot;</span>&lt;&lt;bolle[i].y);</div>
<div class="line">                                <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; bolle.velocita:&quot;</span>&lt;&lt;bolle[i].velocita&lt;&lt;<span class="stringliteral">&quot; bolle.raggio:&quot;</span>&lt;&lt;bolle[i].raggio&lt;&lt;endl);</div>
<div class="line">        </div>
<div class="line">                                <span class="keywordflow">if</span>(robot[j].vivo)</div>
<div class="line">                                {</div>
<div class="line">                                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot;robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].ID&quot;</span>&lt;&lt;robot[i].ID&lt;&lt;<span class="stringliteral">&quot;  robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].x&quot;</span>&lt;&lt;robot[i].x&lt;&lt;<span class="stringliteral">&quot;  robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].y&quot;</span>&lt;&lt;robot[i].y);</div>
<div class="line">                                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].velocita:&quot;</span>&lt;&lt;robot[i].velocita&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].boundx:&quot;</span>&lt;&lt;robot[i].boundx&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].boundy:&quot;</span>&lt;&lt; robot[i].boundy);</div>
<div class="line">                                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].maxFrame:&quot;</span>&lt;&lt;robot[i].maxFrame&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].frameAttuale:&quot;</span>&lt;&lt;robot[i].frameAttuale);</div>
<div class="line">                                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].frameCount: &quot;</span>&lt;&lt;robot[i].frameCount&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].frameRit&quot;</span>&lt;&lt;robot[i].frameRit&lt;&lt;endl);</div>
<div class="line">                                        </div>
<div class="line">                                        <span class="keywordflow">if</span>(     <a class="code" href="collisioni_8cc.html#abf3a1501eaf0c89436fdb6bba12aaf96" title="Controlla i casi di collisione possibili tra due oggetti.">collisioni_X</a>(robot[j].x, robot[j].x + robot[j].boundx, bolle[i].x - bolle[i].raggio, bolle[i].x + bolle[i].raggio) &amp;&amp; </div>
<div class="line">                                                <a class="code" href="collisioni_8cc.html#a7949c37965bd556ee067a251b47ac3da" title="Controlla che i due oggetti abbiano le altezze affiancate.">collisioni_Y</a>(robot[j].y + robot[j].boundy,  bolle[i].y - bolle[i].raggio))</div>
<div class="line">                                                {</div>
<div class="line">                                                        bolle[i].<a class="code" href="structBolle.html#a7a968c449292c92c9fe0d789731ef52b" title="Se l&#39;oggetto è vivo viene disegnato.">vivo</a> = <span class="keyword">false</span>;</div>
<div class="line">                                                        robot[j].<a class="code" href="structRobot.html#aacbd2887c22ede3e590492f2f03b3e1d" title="Se l&#39;oggetto è vivo viene disegnato.">vivo</a> = <span class="keyword">false</span>;</div>
<div class="line">        </div>
<div class="line">                                                        drago.<a class="code" href="structDrago.html#af7c8aef700c3afdb7129e8751c9619e2" title="Score del giocatore.">punti</a>+=100;</div>
<div class="line">                                                }                               </div>
<div class="line">                                }</div>
<div class="line">                        }</div>
<div class="line">                        </div>
<div class="line">                        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j =0; j &lt; fDim; j++)</div>
<div class="line">                        {</div>
<div class="line">                                <span class="keywordflow">if</span>(frutta[j].vivo)</div>
<div class="line">                                {                                                               </div>
<div class="line">                                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot;frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].ID&quot;</span>&lt;&lt;frutta[i].ID&lt;&lt;<span class="stringliteral">&quot;  frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].x&quot;</span>&lt;&lt;frutta[i].x&lt;&lt;<span class="stringliteral">&quot;  frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].y&quot;</span>&lt;&lt;frutta[i].y);</div>
<div class="line">                                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].velocita:&quot;</span>&lt;&lt;frutta[i].velocita&lt;&lt;<span class="stringliteral">&quot; frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].boundx:&quot;</span>&lt;&lt;frutta[i].boundx&lt;&lt;<span class="stringliteral">&quot; frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].boundy:&quot;</span>&lt;&lt; frutta[i].boundy&lt;&lt;endl);</div>
<div class="line">                        </div>
<div class="line">                                        <span class="keywordflow">if</span>(     <a class="code" href="collisioni_8cc.html#abf3a1501eaf0c89436fdb6bba12aaf96" title="Controlla i casi di collisione possibili tra due oggetti.">collisioni_X</a>(frutta[j].x, frutta[j].x + frutta[j].boundx, bolle[i].x - bolle[i].raggio, bolle[i].x + bolle[i].raggio) &amp;&amp; </div>
<div class="line">                                                <a class="code" href="collisioni_8cc.html#a7949c37965bd556ee067a251b47ac3da" title="Controlla che i due oggetti abbiano le altezze affiancate.">collisioni_Y</a>(frutta[j].y + frutta[j].boundy,  bolle[i].y - bolle[i].raggio))</div>
<div class="line">                                                {</div>
<div class="line">                                                        bolle[i].<a class="code" href="structBolle.html#a7a968c449292c92c9fe0d789731ef52b" title="Se l&#39;oggetto è vivo viene disegnato.">vivo</a> = <span class="keyword">false</span>;</div>
<div class="line">                                                        frutta[j].<a class="code" href="structFrutta.html#a53e8fbbef01cb354f994116ca3473b3f" title="Se l&#39;oggetto è vivo viene disegnato.">vivo</a> = <span class="keyword">false</span>;</div>
<div class="line"></div>
<div class="line">                                                        drago.<a class="code" href="structDrago.html#af7c8aef700c3afdb7129e8751c9619e2" title="Score del giocatore.">punti</a>-=100;</div>
<div class="line">                                                        <span class="keywordflow">if</span>(drago.<a class="code" href="structDrago.html#af7c8aef700c3afdb7129e8751c9619e2" title="Score del giocatore.">punti</a> &lt; 0)</div>
<div class="line">                                                                drago.<a class="code" href="structDrago.html#a3ee078b1fc05ba5e3738f201f6aecede" title="l&#39;oggetto ha un numero di vite finite le quali muore">vite</a> = <span class="keyword">false</span>;</div>
<div class="line">                                                }                               </div>
<div class="line">                                }</div>
<div class="line">                        }</div>
<div class="line">                }</div>
<div class="line">        }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a1a755dbf67a837739df151394b4a96b6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gestisci_collisioni_frutta </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structFrutta.html">Frutta</a>&#160;</td>
          <td class="paramname"><em>frutta</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fDim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structDrago.html">Drago</a> &amp;&#160;</td>
          <td class="paramname"><em>drago</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gestisce la collisione della frutta/dolce con ciascuna bolla o con il drago o con il pavimento. </p>
<p>Per ogni frutto/dolce vivo vengono richiamate le funzioni collisioni_X e collsioni_Y per verificare se la frutta ha avuto una collisione con: le bolle o il drago. Nel primo caso si perdono dei punti e sia il drago che la bolla muoiono, nel secondo caso la frutta muore e il punteggio aumenta. Se la frutta arriva a toccare il pavimento muore senza provocare ulteriori conseguenze. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <a class="code" href="debug_8h.html#a330bea9b36f638349fec0d06c8ab4c38">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;  gestisci collisioni frutta&quot;</span>&lt;&lt;endl);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="debug_8h.html#a330bea9b36f638349fec0d06c8ab4c38">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot; dimensione array frutta = &quot;</span>&lt;&lt;fDim&lt;&lt;endl);</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot;drago.ID&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a8f32c76053f70eb9c8949a3d929593b5" title="IDS di tipo GIOCATORE.">ID</a>&lt;&lt;<span class="stringliteral">&quot;  drago.x&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a6dcdcb8c1de4aca42ead8ae2b48ec6b7" title="Posizione sulle x.">x</a>&lt;&lt;<span class="stringliteral">&quot;  drago.y&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a3e3c33c5c4b99a607b1f4322e789f5e1" title="Posizione sulle y.">y</a>&lt;&lt;<span class="stringliteral">&quot; drago.vite&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a3ee078b1fc05ba5e3738f201f6aecede" title="l&#39;oggetto ha un numero di vite finite le quali muore">vite</a>);</div>
<div class="line">        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; drago.velocita:&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a01ef6cc1424c6f25d67fcbd1d9b7aa8d" title="Numero di pixel con i quali si sposta.">velocita</a>&lt;&lt;<span class="stringliteral">&quot; drago.boundx:&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#ad3bfdfc0469c1c7021d373365ecb320e" title="Numero di pixel che formano l&#39;oggetto sulle x.">boundx</a>&lt;&lt;<span class="stringliteral">&quot; drago.boundy:&quot;</span>&lt;&lt; drago.<a class="code" href="structDrago.html#a9dc824bdbf09ddad24f4305658845962" title="Numero di pixel che formano l&#39;oggetto sulle y.">boundy</a>);</div>
<div class="line">        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; drago.punti: &quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#af7c8aef700c3afdb7129e8751c9619e2" title="Score del giocatore.">punti</a>&lt;&lt;<span class="stringliteral">&quot; drago.maxFrame:&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a1e76dfe9fa086b32df87582070857f51">maxFrame</a>&lt;&lt;<span class="stringliteral">&quot; drago.frameAttuale:&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a425cbb3ff8d099f8a993b20fe8fecb07">frameAttuale</a>);</div>
<div class="line">        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; drago.frameCount: &quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a552b236e27085a77b33b123c6b148487">frameCount</a>&lt;&lt;<span class="stringliteral">&quot; drago.frameRit&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#ae5457cf8c9b8a55330e332bed0accdb0">frameRit</a>&lt;&lt;endl);</div>
<div class="line">        </div>
<div class="line">        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; fDim; i++)</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span>(frutta[i].vivo)</div>
<div class="line">                {</div>
<div class="line">                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot;frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].ID&quot;</span>&lt;&lt;frutta[i].ID&lt;&lt;<span class="stringliteral">&quot;  frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].x&quot;</span>&lt;&lt;frutta[i].x&lt;&lt;<span class="stringliteral">&quot;  frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].y&quot;</span>&lt;&lt;frutta[i].y);</div>
<div class="line">                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].velocita:&quot;</span>&lt;&lt;frutta[i].velocita&lt;&lt;<span class="stringliteral">&quot; frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].boundx:&quot;</span>&lt;&lt;frutta[i].boundx&lt;&lt;<span class="stringliteral">&quot; frutta[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].boundy:&quot;</span>&lt;&lt; frutta[i].boundy&lt;&lt;endl);</div>
<div class="line">                        </div>
<div class="line">                        <span class="keywordflow">if</span>(     <a class="code" href="collisioni_8cc.html#abf3a1501eaf0c89436fdb6bba12aaf96" title="Controlla i casi di collisione possibili tra due oggetti.">collisioni_X</a>(frutta[i].x, frutta[i].x + frutta[i].boundx, drago.<a class="code" href="structDrago.html#a6dcdcb8c1de4aca42ead8ae2b48ec6b7" title="Posizione sulle x.">x</a>, drago.<a class="code" href="structDrago.html#a6dcdcb8c1de4aca42ead8ae2b48ec6b7" title="Posizione sulle x.">x</a> + drago.<a class="code" href="structDrago.html#ad3bfdfc0469c1c7021d373365ecb320e" title="Numero di pixel che formano l&#39;oggetto sulle x.">boundx</a>) &amp;&amp; </div>
<div class="line">                                <a class="code" href="collisioni_8cc.html#a7949c37965bd556ee067a251b47ac3da" title="Controlla che i due oggetti abbiano le altezze affiancate.">collisioni_Y</a>(frutta[i].y + frutta[i].boundy,  drago.<a class="code" href="structDrago.html#a3e3c33c5c4b99a607b1f4322e789f5e1" title="Posizione sulle y.">y</a>))</div>
<div class="line">                        {</div>
<div class="line">                                <span class="keywordflow">if</span>(<a class="code" href="booblefruit_8cc.html#a5c124d5b3fcfa99f576c784f7d7ad541" title="Variabile per la memorizzazione dell&#39;ultima mossa fatta (movimento a destra o sinistra) Serve per dis...">prevDir</a> == <a class="code" href="globali_8h.html#a917cb2ad6b731b390f8c57aa48656211aec8379af7490bb9eaaf579cf17876f38">RIGHT</a>)</div>
<div class="line">                                {</div>
<div class="line">                                        drago.<a class="code" href="structDrago.html#a425cbb3ff8d099f8a993b20fe8fecb07">frameAttuale</a> = 10;</div>
<div class="line">                                        drago.<a class="code" href="structDrago.html#a1e76dfe9fa086b32df87582070857f51">maxFrame</a> = 10;</div>
<div class="line">                                }</div>
<div class="line">                                <span class="keywordflow">else</span></div>
<div class="line">                                {</div>
<div class="line">                                        drago.<a class="code" href="structDrago.html#a425cbb3ff8d099f8a993b20fe8fecb07">frameAttuale</a> = 12;</div>
<div class="line">                                        drago.<a class="code" href="structDrago.html#a1e76dfe9fa086b32df87582070857f51">maxFrame</a> = 10;</div>
<div class="line">                                }</div>
<div class="line">                                drago.<a class="code" href="structDrago.html#af7c8aef700c3afdb7129e8751c9619e2" title="Score del giocatore.">punti</a> += 100;</div>
<div class="line">                                frutta[i].<a class="code" href="structFrutta.html#a53e8fbbef01cb354f994116ca3473b3f" title="Se l&#39;oggetto è vivo viene disegnato.">vivo</a> = <span class="keyword">false</span>;</div>
<div class="line">                        }</div>
<div class="line">                        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="booblefruit_8cc.html#a3658e8c4b8b7295dc44657c5bdb4f59a" title="Oggetto di tipo Robot E&#39; un array di elemento Robot, sono i nemici del giocatore che deve uccidere...">robot</a>[i].y &gt;= <a class="code" href="globali_8h.html#af728b7647e0b8c49832983a31f9a2e9b" title="Altezza della finstra di gioco.">HEIGHT</a>)</div>
<div class="line">                        {</div>
<div class="line">                                frutta[i].<a class="code" href="structFrutta.html#a53e8fbbef01cb354f994116ca3473b3f" title="Se l&#39;oggetto è vivo viene disegnato.">vivo</a> = <span class="keyword">false</span>;</div>
<div class="line">                        }</div>
<div class="line">                }</div>
<div class="line">        }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5bdadd9b95a94192be51933f90730b21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gestisci_collisioni_robot </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structRobot.html">Robot</a>&#160;</td>
          <td class="paramname"><em>robot</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cDim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structDrago.html">Drago</a> &amp;&#160;</td>
          <td class="paramname"><em>drago</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gestisce le collisione del robot con il drago o con il suolo. </p>
<p>*Vengono richiamate le funzioni dicollisioni_X e Collcollisioni_Y, nel caso in cui i robot collidessero con il drago questo perde una vita, e il robot muore. Stesse conseguenze se il drago tocca terra senza essere stato ucciso da una bolla. </p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <a class="code" href="debug_8h.html#a330bea9b36f638349fec0d06c8ab4c38">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot;  gestisci_collisioni_robot&quot;</span>&lt;&lt;endl);</div>
<div class="line"></div>
<div class="line">        <a class="code" href="debug_8h.html#a330bea9b36f638349fec0d06c8ab4c38">D1</a>(cout&lt;&lt;<span class="stringliteral">&quot; dimensione array robot = &quot;</span>&lt;&lt;cDim&lt;&lt;endl);</div>
<div class="line">        </div>
<div class="line">        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot;drago.ID&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a8f32c76053f70eb9c8949a3d929593b5" title="IDS di tipo GIOCATORE.">ID</a>&lt;&lt;<span class="stringliteral">&quot;  drago.x&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a6dcdcb8c1de4aca42ead8ae2b48ec6b7" title="Posizione sulle x.">x</a>&lt;&lt;<span class="stringliteral">&quot;  drago.y&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a3e3c33c5c4b99a607b1f4322e789f5e1" title="Posizione sulle y.">y</a>&lt;&lt;<span class="stringliteral">&quot; drago.vite&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a3ee078b1fc05ba5e3738f201f6aecede" title="l&#39;oggetto ha un numero di vite finite le quali muore">vite</a>);</div>
<div class="line">        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; drago.velocita:&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a01ef6cc1424c6f25d67fcbd1d9b7aa8d" title="Numero di pixel con i quali si sposta.">velocita</a>&lt;&lt;<span class="stringliteral">&quot; drago.boundx:&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#ad3bfdfc0469c1c7021d373365ecb320e" title="Numero di pixel che formano l&#39;oggetto sulle x.">boundx</a>&lt;&lt;<span class="stringliteral">&quot; drago.boundy:&quot;</span>&lt;&lt; drago.<a class="code" href="structDrago.html#a9dc824bdbf09ddad24f4305658845962" title="Numero di pixel che formano l&#39;oggetto sulle y.">boundy</a>);</div>
<div class="line">        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; drago.punti: &quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#af7c8aef700c3afdb7129e8751c9619e2" title="Score del giocatore.">punti</a>&lt;&lt;<span class="stringliteral">&quot; drago.maxFrame:&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a1e76dfe9fa086b32df87582070857f51">maxFrame</a>&lt;&lt;<span class="stringliteral">&quot; drago.frameAttuale:&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a425cbb3ff8d099f8a993b20fe8fecb07">frameAttuale</a>);</div>
<div class="line">        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; drago.frameCount: &quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#a552b236e27085a77b33b123c6b148487">frameCount</a>&lt;&lt;<span class="stringliteral">&quot; drago.frameRit&quot;</span>&lt;&lt;drago.<a class="code" href="structDrago.html#ae5457cf8c9b8a55330e332bed0accdb0">frameRit</a>&lt;&lt;endl);</div>
<div class="line">                </div>
<div class="line">        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; cDim; i++)</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span>(robot[i].vivo)</div>
<div class="line">                {</div>
<div class="line">                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot;robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].ID&quot;</span>&lt;&lt;robot[i].ID&lt;&lt;<span class="stringliteral">&quot;  robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].x&quot;</span>&lt;&lt;robot[i].x&lt;&lt;<span class="stringliteral">&quot;  robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].y&quot;</span>&lt;&lt;robot[i].y);</div>
<div class="line">                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].velocita:&quot;</span>&lt;&lt;robot[i].velocita&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].boundx:&quot;</span>&lt;&lt;robot[i].boundx&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].boundy:&quot;</span>&lt;&lt; drago.<a class="code" href="structDrago.html#a9dc824bdbf09ddad24f4305658845962" title="Numero di pixel che formano l&#39;oggetto sulle y.">boundy</a>);</div>
<div class="line">                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].maxFrame:&quot;</span>&lt;&lt;robot[i].maxFrame&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].frameAttuale:&quot;</span>&lt;&lt;robot[i].frameAttuale);</div>
<div class="line">                        <a class="code" href="debug_8h.html#a975397c373ae2a9dc28d0297fa18da56">D2</a>(cout&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].frameCount: &quot;</span>&lt;&lt;robot[i].frameCount&lt;&lt;<span class="stringliteral">&quot; robot[&quot;</span>&lt;&lt;i&lt;&lt;<span class="stringliteral">&quot;].frameRit&quot;</span>&lt;&lt;robot[i].frameRit&lt;&lt;endl);</div>
<div class="line">        </div>
<div class="line">                        <span class="keywordflow">if</span>(     <a class="code" href="collisioni_8cc.html#abf3a1501eaf0c89436fdb6bba12aaf96" title="Controlla i casi di collisione possibili tra due oggetti.">collisioni_X</a>(robot[i].x, robot[i].x + robot[i].boundx, drago.<a class="code" href="structDrago.html#a6dcdcb8c1de4aca42ead8ae2b48ec6b7" title="Posizione sulle x.">x</a>, drago.<a class="code" href="structDrago.html#a6dcdcb8c1de4aca42ead8ae2b48ec6b7" title="Posizione sulle x.">x</a> + drago.<a class="code" href="structDrago.html#ad3bfdfc0469c1c7021d373365ecb320e" title="Numero di pixel che formano l&#39;oggetto sulle x.">boundx</a>) &amp;&amp; </div>
<div class="line">                                <a class="code" href="collisioni_8cc.html#a7949c37965bd556ee067a251b47ac3da" title="Controlla che i due oggetti abbiano le altezze affiancate.">collisioni_Y</a>(robot[i].y + robot[i].boundy,  drago.<a class="code" href="structDrago.html#a3e3c33c5c4b99a607b1f4322e789f5e1" title="Posizione sulle y.">y</a>))</div>
<div class="line">                        {</div>
<div class="line">                                drago.<a class="code" href="structDrago.html#a3ee078b1fc05ba5e3738f201f6aecede" title="l&#39;oggetto ha un numero di vite finite le quali muore">vite</a>--;</div>
<div class="line">                                robot[i].<a class="code" href="structRobot.html#aacbd2887c22ede3e590492f2f03b3e1d" title="Se l&#39;oggetto è vivo viene disegnato.">vivo</a> = <span class="keyword">false</span>;</div>
<div class="line">                        }</div>
<div class="line">                        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(robot[i].y &gt;= <a class="code" href="globali_8h.html#af728b7647e0b8c49832983a31f9a2e9b" title="Altezza della finstra di gioco.">HEIGHT</a>)</div>
<div class="line">                        {</div>
<div class="line">                                robot[i].<a class="code" href="structRobot.html#aacbd2887c22ede3e590492f2f03b3e1d" title="Se l&#39;oggetto è vivo viene disegnato.">vivo</a> = <span class="keyword">false</span>;</div>
<div class="line">                                drago.<a class="code" href="structDrago.html#a3ee078b1fc05ba5e3738f201f6aecede" title="l&#39;oggetto ha un numero di vite finite le quali muore">vite</a>--;</div>
<div class="line">                        }</div>
<div class="line">                }</div>
<div class="line">        }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generato Lun 10 Giu 2013 11:45:14 per Bobble Fruit da &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.2
</small></address>
</body>
</html>
